<template>
  <div>
    <Form ref="formValidate" :model="formValidate" :label-width="120" :label-colon="true" :rules="formRules"
          style="width: 200px;"
          :disabled="type === 3">
      <FormItem label="农村名称" prop="rfRuralName">
        <Input v-model="formValidate.rfRuralName"/>
      </FormItem>
      <FormItem label="网格名字">
        <Input v-model="formValidate.gridName"/>
      </FormItem>
      <FormItem label="网格等级">
        <Input v-model="formValidate.gridLevel"/>
      </FormItem>
      <FormItem label="党员人数">
        <Input v-model="formValidate.partyMemberNumber"/>
      </FormItem>
      <FormItem label="户籍人数">
        <Input v-model="formValidate.registeredPopulationNumber"/>
      </FormItem>
      <FormItem label="网格坐标">
        <Input v-model="formValidate.coordinates"/>
      </FormItem>
      <FormItem label="统计年份">
        <Input v-model="formValidate.statisticsYear"/>
      </FormItem>
      <FormItem :label-width="0" style="text-align: right">
        <Button style="margin-right: 10px;" @click="publicReset('formValidate')">取消</Button>
        <Button type="primary" @click="publicSubmit('formValidate')">确定</Button>
      </FormItem>
      </Form>
  </div>
</template>
<script>
import { updateMixin } from '@/mixin/index'
import API_KEY from '../../../api'
import store from '@/store'

export default {
  mixins: [updateMixin],
  data () {
    return {
      formValidate: { // 搜索条件
        fkRuralId: store.getters.userInfo.deptList[0].id,
        rfRuralName: '',
        gridName: '',
        gridLevel: '',
        partyMemberNumber: '',
        registeredPopulationNumber: '',
        coordinates: '',
        statisticsYear: ''
      },
      formRules: {
        rfRuralName: [{ required: true, message: '请输入农村名称', trigger: 'blur' }]
      },
      action: {
        readDataById: API_KEY.ruralGridDistribution.curdRural,
        createData: API_KEY.ruralGridDistribution.createData,
        updateData: API_KEY.ruralGridDistribution.update
      }
    }
  }
}
</script>

<style scoped lang="scss">

</style>
